home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tegl6b.zip / INTROPAK.EXE / lha / GRTEST01.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-06  |  1KB  |  46 lines

  1. {-----------------------------------------------------------------------------}
  2. {               TEGL Windows ToolKit II                  }
  3. {          Copyright (C) 1990, TEGL Systems Corporation              }
  4. {                All Rights Reserved.                  }
  5. {-----------------------------------------------------------------------------}
  6. {                                          }
  7. { This program demonstrates the automatic loading of TEGL Drivers located     }
  8. { anywhere on the DOS path as well as the direct drop-in replacement of the   }
  9. { Borland's Graph unit. You can compile using Borland's Graph unit simply by  }
  10. { changing TGraph to Graph in the uses statement.                  }
  11. {                                          }
  12. {-----------------------------------------------------------------------------}
  13. { $define BGI}
  14.  
  15. uses
  16.    crt,
  17. {$ifdef BGI}
  18.    graph;
  19. {$else}
  20.    tgraph;
  21. {$endif}
  22.  
  23. var gd,gm : integer;
  24.     ch      : char;
  25.  
  26. begin
  27.    gd := ega;
  28.    gm := egahi;
  29.  
  30.    initgraph(gd,gm,'..');
  31.    if gd<0 then
  32.       begin
  33.      writeln('Error registering driver:',GraphErrorMsg(GraphResult));
  34.      halt(1);
  35.       end;
  36.  
  37.    setcolor(blue);
  38.    rectangle(0,0,getmaxx,getmaxy);
  39.  
  40.    while keypressed do ch:=readkey;
  41.    while not keypressed do;
  42.    while keypressed do ch:=readkey;
  43.  
  44.    closegraph;
  45. end.
  46.